package com.sales;

import com.sales.util.SalesRequestLoggingFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.HeaderHttpSessionStrategy;
import org.springframework.session.web.http.HttpSessionStrategy;

/**
 * Created by hanxi on 2017/7/3.
 */
@Configuration
@EnableRedisHttpSession
public class AppConfig {
    @Bean
    public HttpSessionStrategy httpSessionStrategy() {
        return new HeaderHttpSessionStrategy();
    }

    @Bean
    public SalesRequestLoggingFilter loggingFilter() {
        return new SalesRequestLoggingFilter();
    }

}
